public class classcastexp {
    public static void main(String[] args) {
        a a1=new b();
        b b1=(b)a1;
        c c1=(c)a1;
    }
}
class a{ }
class b extends a{}
class c extends a{}